package com.styles.codingstyle.controller;

import com.styles.codingstyle.VO.CommonVO;
import com.styles.codingstyle.dataobject.ObjEntity;
import com.styles.codingstyle.services.ObjService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.data.web.PageableDefault;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author chenjian
 * @Package
 * @Description:
 * @date 2018/5/23 11:43
 */
@RestController
@RequestMapping(value = "/obj")
public class ObjController {

    @Autowired
    private ObjService objServiceImpl;

    @GetMapping(value = "/one/{id}")
    public CommonVO findObjById(@PathVariable("id") Long id) {
        ObjEntity objEntity = objServiceImpl.findById(id);
        return null;
    }

    @GetMapping(value = "/pageable")
    public CommonVO findAll(@PageableDefault( page = 0, size = 10,sort = "id,asc") Pageable pageable) {
        return null;
    }
}
